package net.xju3_4.service.impl;

import net.xju3_4.dao.MerchantDao;
import net.xju3_4.entity.Merchant;
import net.xju3_4.service.MerchantService;

public class MerchantServiceImpl implements MerchantService {

    MerchantDao merchantDao = new MerchantDao();

    @Override
    public void update(Merchant merchant) {
        merchantDao.update(merchant);
    }

    @Override
    public Merchant getMerchant(int id) {
       return merchantDao.get(id);
    }

    @Override
    public void resetPassword(Merchant merchant) {
        merchantDao.resetPassword(merchant);
    }

    @Override
    public boolean updateLogo(String id, String logoUrl) {
        try {
            return MerchantDao.updateLogo(id, logoUrl);
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }


}

